*------------------------------------------------------------
* Purpose: Install all required user-written Stata packages
* Usage:   Run once before executing any analysis scripts.
*------------------------------------------------------------

* Install ftools
cap ado uninstall ftools
net install ftools, from("https://raw.githubusercontent.com/sergiocorreia/ftools/master/src/")

* Install reghdfe
cap ado uninstall reghdfe
net install reghdfe, from("https://raw.githubusercontent.com/sergiocorreia/reghdfe/master/src/")

* Install ivreg2, the core package
cap ado uninstall ivreg2
ssc install ivreg2, replace

* Install ivreghdfe
cap ado uninstall ivreghdfe
net install ivreghdfe, from(https://raw.githubusercontent.com/sergiocorreia/ivreghdfe/master/src/)

* Finally, install ranktest
cap ado uninstall ranktest
ssc install ranktest, replace
